package cn.ljy.uem.model;

import cn.ljy.authority.model.SysUser;
import cn.ljy.common.model.BaseModel;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @description 课堂消息模块
 * @author 王秋林
 * @date 2022-11-30
 */
@ApiModel(value="课堂消息模块")
@Data
@NoArgsConstructor
public class SchoolTeachingTaskLessonMessage extends BaseModel {
    private String id;

    @NotNull(message = "课堂任务id不能为空")
    private String lessonId;                           //课堂d

    @NotNull(message = "发言者不能为空")
    private SysUser poster;                        //发言者

    @Length(min = 0,max = 20,message = "发言的标题的长度必须在{min} - {max}之间")
    private String title;                              //发言的标题（预留字段）
    @NotNull(message = "发言内容不能为空")
    private String content;                            //发言内容
    private String fileId;                             //文件id
    private Date createTime;                           //发言时间
    private String replyMessageId;                     //回复的消息外键(uuid)
    private SysUser replyPoster;                       //回复的账户id

    //非数据库字段
    private SchoolTeachingTaskLesson schoolTeachingTaskLesson; //消息所属课堂

    private SchoolTeachingTaskLessonMessageFile file;   //消息对应的文件字段

    private SchoolTeachingTaskLessonMessage replyMessage;
}
